<include file="Public:header" />
<script type="text/javascript" src="/Public/Js/ueditor/ueditor.config.js"></script>	<!--ueditor编辑器-->
<script type="text/javascript" src="/Public/Js/ueditor/ueditor.all.min.js"></script>
<form method="POST" action="__ACTION__" name="myform" id="myform">
  <input name="data[id]" type="hidden" value="{$info.id}" />
  <fieldset>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th width="100">文章标题：</th>
          <td><input name="data[title]" id="title" class="input-text" type="text" size="80" value="{$info.title}" style="width:400px;"></td>
        </tr>
        <tr>
          <th width="100">文章类型：</th>
          <td>
          <select name="data[cid]">
              <option value="0">未分类</option>
              <volist name="classifyList" id="vo">
              <option value="{$vo.id}" <if condition="$vo.id eq $info['cid']">selected="selected"</if> />{$vo.name}</option>
              </volist>
            </select>
          </td>
        </tr>
        <tr class="last">
          <th>文章内容：</th>
          <td><textarea name="data[content]" id="editor" style="height: 350px; width: 650px;">{$info.content}</textarea></td>
        </tr>
      </tbody>
    </table>
  </fieldset>
  <input type="submit" value="提交" class="dialog" id="dosubmit">
</form>
</body>
</html>
<script type="text/javascript">
$(function(){
	$('#myform').ajaxForm({
		beforeSubmit:  checkForm,
		success:       complete,
		dataType: 'json'
	});
	function checkForm(){
		if($('#title').val()==''){
			checkInfo('title','请填写文章标题');
			$('#title').focus();
			return false;
		}else{
			return true;	
		}
	}
	var origin = $.artDialog.open.origin;
    function complete(data){
		msg(data.info,data.status);
		if(data.status){
			setTimeout(function(){origin.location.reload();},1000);
			closeWin(1500);
		}
    }
	
})
</script>
<script type="text/javascript">
    //实例化编辑器
    var ue = UE.getEditor('editor');
</script>
